home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / composer / nsIEditingSession.h
C/C++ Source or Header  |  2006-05-08  |  8KB  |  211 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIEditingSession.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIEditingSession_h__
  6. #define __gen_nsIEditingSession_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_domstubs_h__
  14. #include "domstubs.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. class nsIEditor; /* forward declaration */
  22.  
  23. class nsIEditingShell; /* forward declaration */
  24.  
  25.  
  26. /* starting interface:    nsIEditingSession */
  27. #define NS_IEDITINGSESSION_IID_STR "d39fd2b4-3978-45d2-a4be-ba448171b61b"
  28.  
  29. #define NS_IEDITINGSESSION_IID \
  30.   {0xd39fd2b4, 0x3978, 0x45d2, \
  31.     { 0xa4, 0xbe, 0xba, 0x44, 0x81, 0x71, 0xb6, 0x1b }}
  32.  
  33. class NS_NO_VTABLE nsIEditingSession : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IEDITINGSESSION_IID)
  37.  
  38.   /**
  39.    *  Error codes when we fail to create an editor
  40.    *  is placed in attribute editorStatus
  41.    */
  42.   enum { eEditorOK = 0 };
  43.  
  44.   enum { eEditorCreationInProgress = 1 };
  45.  
  46.   enum { eEditorErrorCantEditMimeType = 2 };
  47.  
  48.   enum { eEditorErrorFileNotFound = 3 };
  49.  
  50.   enum { eEditorErrorCantEditFramesets = 8 };
  51.  
  52.   enum { eEditorErrorUnknown = 9 };
  53.  
  54.   /**
  55.    *  Status after editor creation and document loading
  56.    *  Value is one of the above error codes
  57.    */
  58.   /* readonly attribute unsigned long editorStatus; */
  59.   NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus) = 0;
  60.  
  61.   /**
  62.    *  Make this window editable
  63.    *  @param aWindow nsIDOMWindow, the window the embedder needs to make editable
  64.    *  @param aEditorType string, "html" "htmlsimple" "text" "textsimple"
  65.    */
  66.   /* void makeWindowEditable (in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad); */
  67.   NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad) = 0;
  68.  
  69.   /**
  70.    *  Test whether a specific window has had its editable flag set; it may have an editor
  71.    *  now, or will get one after the uri load.
  72.    *  
  73.    *  Use this, passing the content root window, to test if we've set up editing
  74.    *  for this content.
  75.    */
  76.   /* boolean windowIsEditable (in nsIDOMWindow window); */
  77.   NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval) = 0;
  78.  
  79.   /**
  80.    *  Get the editor for this window. May return null
  81.    */
  82.   /* nsIEditor getEditorForWindow (in nsIDOMWindow window); */
  83.   NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval) = 0;
  84.  
  85.   /** 
  86.    *  Setup editor and related support objects
  87.    */
  88.   /* void setupEditorOnWindow (in nsIDOMWindow window); */
  89.   NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) = 0;
  90.  
  91.   /** 
  92.    *   Destroy editor and related support objects
  93.    */
  94.   /* void tearDownEditorOnWindow (in nsIDOMWindow window); */
  95.   NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) = 0;
  96.  
  97.   /* void setEditorOnControllers (in nsIDOMWindow aWindow, in nsIEditor aEditor); */
  98.   NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) = 0;
  99.  
  100. };
  101.  
  102. /* Use this macro when declaring classes that implement this interface. */
  103. #define NS_DECL_NSIEDITINGSESSION \
  104.   NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus); \
  105.   NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad); \
  106.   NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval); \
  107.   NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval); \
  108.   NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window); \
  109.   NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window); \
  110.   NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor); 
  111.  
  112. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  113. #define NS_FORWARD_NSIEDITINGSESSION(_to) \
  114.   NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus) { return _to GetEditorStatus(aEditorStatus); } \
  115.   NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad) { return _to MakeWindowEditable(window, aEditorType, doAfterUriLoad); } \
  116.   NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval) { return _to WindowIsEditable(window, _retval); } \
  117.   NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval) { return _to GetEditorForWindow(window, _retval); } \
  118.   NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) { return _to SetupEditorOnWindow(window); } \
  119.   NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) { return _to TearDownEditorOnWindow(window); } \
  120.   NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) { return _to SetEditorOnControllers(aWindow, aEditor); } 
  121.  
  122. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  123. #define NS_FORWARD_SAFE_NSIEDITINGSESSION(_to) \
  124.   NS_IMETHOD GetEditorStatus(PRUint32 *aEditorStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditorStatus(aEditorStatus); } \
  125.   NS_IMETHOD MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeWindowEditable(window, aEditorType, doAfterUriLoad); } \
  126.   NS_IMETHOD WindowIsEditable(nsIDOMWindow *window, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->WindowIsEditable(window, _retval); } \
  127.   NS_IMETHOD GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEditorForWindow(window, _retval); } \
  128.   NS_IMETHOD SetupEditorOnWindow(nsIDOMWindow *window) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetupEditorOnWindow(window); } \
  129.   NS_IMETHOD TearDownEditorOnWindow(nsIDOMWindow *window) { return !_to ? NS_ERROR_NULL_POINTER : _to->TearDownEditorOnWindow(window); } \
  130.   NS_IMETHOD SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEditorOnControllers(aWindow, aEditor); } 
  131.  
  132. #if 0
  133. /* Use the code below as a template for the implementation class for this interface. */
  134.  
  135. /* Header file */
  136. class nsEditingSession : public nsIEditingSession
  137. {
  138. public:
  139.   NS_DECL_ISUPPORTS
  140.   NS_DECL_NSIEDITINGSESSION
  141.  
  142.   nsEditingSession();
  143.  
  144. private:
  145.   ~nsEditingSession();
  146.  
  147. protected:
  148.   /* additional members */
  149. };
  150.  
  151. /* Implementation file */
  152. NS_IMPL_ISUPPORTS1(nsEditingSession, nsIEditingSession)
  153.  
  154. nsEditingSession::nsEditingSession()
  155. {
  156.   /* member initializers and constructor code */
  157. }
  158.  
  159. nsEditingSession::~nsEditingSession()
  160. {
  161.   /* destructor code */
  162. }
  163.  
  164. /* readonly attribute unsigned long editorStatus; */
  165. NS_IMETHODIMP nsEditingSession::GetEditorStatus(PRUint32 *aEditorStatus)
  166. {
  167.     return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169.  
  170. /* void makeWindowEditable (in nsIDOMWindow window, in string aEditorType, in boolean doAfterUriLoad); */
  171. NS_IMETHODIMP nsEditingSession::MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType, PRBool doAfterUriLoad)
  172. {
  173.     return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175.  
  176. /* boolean windowIsEditable (in nsIDOMWindow window); */
  177. NS_IMETHODIMP nsEditingSession::WindowIsEditable(nsIDOMWindow *window, PRBool *_retval)
  178. {
  179.     return NS_ERROR_NOT_IMPLEMENTED;
  180. }
  181.  
  182. /* nsIEditor getEditorForWindow (in nsIDOMWindow window); */
  183. NS_IMETHODIMP nsEditingSession::GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval)
  184. {
  185.     return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187.  
  188. /* void setupEditorOnWindow (in nsIDOMWindow window); */
  189. NS_IMETHODIMP nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *window)
  190. {
  191.     return NS_ERROR_NOT_IMPLEMENTED;
  192. }
  193.  
  194. /* void tearDownEditorOnWindow (in nsIDOMWindow window); */
  195. NS_IMETHODIMP nsEditingSession::TearDownEditorOnWindow(nsIDOMWindow *window)
  196. {
  197.     return NS_ERROR_NOT_IMPLEMENTED;
  198. }
  199.  
  200. /* void setEditorOnControllers (in nsIDOMWindow aWindow, in nsIEditor aEditor); */
  201. NS_IMETHODIMP nsEditingSession::SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor)
  202. {
  203.     return NS_ERROR_NOT_IMPLEMENTED;
  204. }
  205.  
  206. /* End of implementation class template. */
  207. #endif
  208.  
  209.  
  210. #endif /* __gen_nsIEditingSession_h__ */
  211.